//
//  main.c
//  pcapdemo01
//
//  Created by song on 15/8/18.
//  Copyright (c) 2015年 song. All rights reserved.
//

#include <stdio.h>
#include <pcap.h>

int main(int argc, const char * argv[]) {
    char *dev,
    errbuf[PCAP_ERRBUF_SIZE];
    dev=pcap_lookupdev(errbuf);
    if(dev==NULL)
    {
        printf(stderr,"couldn't find default device: %s/n",errbuf);
        return(2);
    }
    printf("Device: %s/n",dev); 

    return 0;
}
